package com.example.serviceconsumer;

import cn.hutool.extra.spring.EnableSpringUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

@EnableSpringUtil
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class ServiceConsumerApplication implements CommandLineRunner {
	@Value("${my.a}")
	int a;
	@Value("${my.b}")
	String b;

	public static void main(String[] args) {
		SpringApplication.run(ServiceConsumerApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		System.out.printf("a:%d b:%s%n", a, b);
	}
}
